<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
if (isset($_GET["regId"]) && isset($_GET["id"])) {
    $regId = $_GET["regId"];
    $id = $_GET["id"];

    include_once './GCM.php';
    include "config/config.php";
    include_once 'db_functions.php';
    $gcm = new GCM();
    $db3 = new DB_Functions();
    $query3 = $db3->getIklan($id);
    $r = mysql_fetch_assoc($query3);
// $rows[] = $r;
    $message = json_encode($r);

    $registatoin_ids = array($regId);
    $message = array("price" => $message);

    $result = $gcm->send_notification($registatoin_ids, $message);

    echo $result;
}
?>
